/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: Faculty of informatics, Burapha University 01
 * License Type: Purchased
 */
package cn.imvc.app.entities;

import java.io.Serializable;
import javax.persistence.*;
@Entity
@org.hibernate.annotations.Proxy(lazy=false)
@Table(name="ref_relation")
public class RefRelation implements Serializable {
	public RefRelation() {
	}
	
	private int id;
	
	private String refField;
	
	private String refTable;
	
	private String dataField;
	
	private String dataTable;
	
	private String delMsg;
	
	private String remark;
	
	public void setId(int value) {
		this.id = value;
	}
	
	@Column(name="id", nullable=false)	
	@Id	
	@GeneratedValue(generator="CN_IMVC_APP_ENTITIES_REFRELATION_ID_GENERATOR")	
	@org.hibernate.annotations.GenericGenerator(name="CN_IMVC_APP_ENTITIES_REFRELATION_ID_GENERATOR", strategy="native")	
	public int getId() {
		return id;
	}
	
	@Transient	
	public int getORMID() {
		return getId();
	}
	
	/**
	 * 被引用字段
	 */
	public void setRefField(String value) {
		this.refField = value;
	}
	
	/**
	 * 被引用字段
	 */
	@Column(name="refField", nullable=true, length=255)	
	public String getRefField() {
		return refField;
	}
	
	/**
	 * 被引用表
	 */
	public void setRefTable(String value) {
		this.refTable = value;
	}
	
	/**
	 * 被引用表
	 */
	@Column(name="refTable", nullable=true, length=255)	
	public String getRefTable() {
		return refTable;
	}
	
	/**
	 * 数据引用字段
	 */
	public void setDataField(String value) {
		this.dataField = value;
	}
	
	/**
	 * 数据引用字段
	 */
	@Column(name="dataField", nullable=true, length=255)	
	public String getDataField() {
		return dataField;
	}
	
	/**
	 * 数据引用表
	 */
	public void setDataTable(String value) {
		this.dataTable = value;
	}
	
	/**
	 * 数据引用表
	 */
	@Column(name="dataTable", nullable=true, length=255)	
	public String getDataTable() {
		return dataTable;
	}
	
	/**
	 * 删除时，提示信息
	 */
	public void setDelMsg(String value) {
		this.delMsg = value;
	}
	
	/**
	 * 删除时，提示信息
	 */
	@Column(name="delMsg", nullable=true, length=255)	
	public String getDelMsg() {
		return delMsg;
	}
	
	/**
	 * 备注
	 */
	public void setRemark(String value) {
		this.remark = value;
	}
	
	/**
	 * 备注
	 */
	@Column(name="remark", nullable=true, length=255)	
	public String getRemark() {
		return remark;
	}
	
	public String toString() {
		return toString(false);
	}
	
	public String toString(boolean idOnly) {
		if (idOnly) {
			return String.valueOf(getId());
		}
		else {
			StringBuffer sb = new StringBuffer();
			sb.append("RefRelation[ ");
			sb.append("Id=").append(getId()).append(" ");
			sb.append("RefField=").append(getRefField()).append(" ");
			sb.append("RefTable=").append(getRefTable()).append(" ");
			sb.append("DataField=").append(getDataField()).append(" ");
			sb.append("DataTable=").append(getDataTable()).append(" ");
			sb.append("DelMsg=").append(getDelMsg()).append(" ");
			sb.append("Remark=").append(getRemark()).append(" ");
			sb.append("]");
			return sb.toString();
		}
	}
	
}
